import {createGlobalState} from "@vueuse/core";
import {ref} from "vue";

const useLoading = createGlobalState(() => {
    const isLoading = ref(false);
    const toggle = (value: boolean) => {
        isLoading.value = value;
    }
    return {
        isLoading,
        toggle
    }
})

export default useLoading;